package TG_9;

public class Solution {
	public boolean isPalindrome(int x) {
		if (x < 0 || (x % 10 == 0 && x != 0)) {
			return false;
		}

		int reNumber = 0;
		while (x > reNumber) {
			reNumber = reNumber * 10 + x % 10;
			x /= 10;
		}

		return x == reNumber || x == reNumber / 10;
	}
}
